﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RegistrarAsistencia.ascx.cs"
    Inherits="AP.LUNA.Shell.Views.RegistrarAsistencia" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<div class="page-header">
    <h3>
        Registrar Asistencia
    </h3>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
            <asp:View ID="View1" runat="server">
                <table align="center" width="70%">
                    <tr>
                        <td>
                            <asp:GridView ID="gvAsignaturas" Width="100%" runat="server" DataKeyNames="Id" OnRowCommand="gvAsignaturas_RowCommand">
                                <Columns>
                                    <asp:BoundField HeaderText="Id" DataField="Id" />
                                    <asp:BoundField HeaderText="Asignatura" DataField="Nombre_Asignatura" />
                                    <asp:BoundField HeaderText="Curso" DataField="Grado" />
                                    <asp:TemplateField FooterStyle-HorizontalAlign="Left"><ItemTemplate><asp:LinkButton runat="server" CssClass="link" CommandName="Asistencia" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                ID="lkbAsistencia" Text="Asistencia"></asp:LinkButton></ItemTemplate></asp:TemplateField>
                                    <%--<asp:TemplateField FooterStyle-HorizontalAlign="Left">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkbDesempenos" CssClass="link" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                runat="server" CommandName="Desempeno" Text="Programar Desempeños de Comprensión"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>--%>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="View2" runat="server">
                <table align="center" width="70%">
                    <tr>
                        <td width="10%">
                            <asp:Label ID="Label1" runat="server" Text="Fecha"></asp:Label>
                        </td>
                        <td width="90%">
                            <asp:TextBox ID="txtFecha" runat="server" Width="30%" AutoPostBack="True" 
                                ontextchanged="txtFecha_TextChanged"></asp:TextBox>
                            <asp:CalendarExtender ID="CalTxtFecha" runat="server" TargetControlID="txtFecha" Format="yyyy-MM-dd"></asp:CalendarExtender>
                        </td>
                    </tr>                    
                    <tr>
                    <td colspan="2">
                    &nbsp;
                    </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:GridView ID="gvAlumnos" runat="server" Width="100%" AutoGenerateColumns="False"
                                ShowHeader="False" AllowPaging="false">
                                <Columns>
                                    <asp:TemplateField><ItemStyle Width="20px" /><ItemTemplate><asp:Label ID="lbCodigo" runat="server" Text='<%# ((GridViewRow) Container).RowIndex +1%>' /></ItemTemplate></asp:TemplateField>
                                    <asp:BoundField HeaderText="Alumno" DataField="NombreCompletoLista" />
                                    <asp:TemplateField><ItemStyle Width="20px" /><ItemTemplate><asp:CheckBox ID="chkAsiste" runat="server" Checked='<%# Eval("Asistio") %>' /><asp:Label ID="lbId" Style="display: none" runat="server" Text='<%# Eval("Id") %>' /></ItemTemplate></asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" colspan="2">
                            <asp:LinkButton ID="lkbVolver" runat="server" OnClick="lkbVolver_Click">Volver</asp:LinkButton>
                            <asp:LinkButton ID="lkbGuardar" runat="server" OnClick="lkbGuardar_Click">Guardar</asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </asp:View>
        </asp:MultiView>
        <br />
        <br />
    </ContentTemplate>
</asp:UpdatePanel>
